package com.an;

public class Main {
    public static void main(String[] args) {
        String input = "['https://img2.baidu.com/it/u=1823987265,1094960967&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500','https://img2.baidu.com/it/u=4165996044,1215288677&fm=253&fmt=auto&app=138&f=JPEG?w=737&h=500']";
        String[] result = convertToArray(input);
        for (String s : result) {
            System.out.println(s);
        }
    }

    public static String[] convertToArray(String input) {
        // 去除字符串中的方括号和单引号
        String cleanedInput = input.replaceAll("\\[|\\]|'", "");
        // 根据逗号分割字符串
        String[] array = cleanedInput.split(",");
        return array;
    }
}